// 实现一个Pick
type Todo = {
  title: string;
  description: string;
  completed: boolean;
};

// todo....
// K extends keyof T: K 是 T的键的一个有效子集
type MyPick<T, K extends keyof T> = {
  [key in K]: T[key];
};

type TodoPreview = MyPick<Todo, "title" | "completed">;
const todo: TodoPreview = {
  title: "Clean Root",
  completed: true,
};
